<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
</head>
<body>

</body>
<script type="text/javascript">
    //定义一个构造函数
    function Person(name,age,sex,friend,say,content)
    {
        this.name = name;
        this.age = age;
        this.sex = sex;
        this.friend = friend;
        this.say = say;
        this.content = content;
        this.sayName = function()
        {
            document.write("大家好，我是" + this.name + "，今年" + this.age + "岁，我是个" + this.sex + "人，但是，我有个" + this.friend + "，他" + this.say + "，然后" + this.content);
        };
    }
    var person1 = new Person("小明",18,"男","男朋友","会说话","说的是啥我也不知道");//创建一个person1对象
    person1.sayName();
</script>
</html>